<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>登录</title>
    <link rel="stylesheet" type="text/css" href="__STATIC__/libs/layui/css/layui.css" />
    <script language="JavaScript">
        <!--
    if(top!=self)
    if(self!=top) top.location=self.location;
//-->
</script>
    <style type="text/css">
    body {background-repeat: no-repeat; background-color: #f1f4fd; background-size: cover; background-image: url(__STATIC__/admin/img/bg.png); }
    ::-webkit-input-placeholder {color: #999;}
    ::-moz-placeholder {color: #999;}
    :-ms-input-placeholder {color: #999;}
    .login-main {width: 400px;margin: auto !important;margin-top: 140px !important; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; background: #fff; -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; box-shadow:0 0 30px rgb(0 0 0 / 10%);overflow: hidden;}
    .login-main .layui-elip{margin-bottom: 15px;height: 117px; background-color: #148be4;font-size: 30px; font-weight: 400; font-stretch: normal; letter-spacing: 0; color: #fff; line-height: 117px; text-align: center; overflow: hidden; -webkit-transform: rotate(0); -moz-transform: rotate(0); -ms-transform: rotate(0); -o-transform: rotate(0); transform: rotate(0); }
    .login-main .layui-elip span.version {font-size: 12px; }
    .login-main .layui-elip .bg1 {display: inline-block; width: 74px; height: 74px; background: #fff; opacity: .1; border-radius: 0 74px 0 0; position: absolute; left: 0; top: 43px; }
    .login-main .layui-elip .bg2 {display: inline-block; width: 94px; height: 94px; background: #fff; opacity: .1; border-radius: 50%; position: absolute; right: -16px; top: -16px; }
    .login-main .login-container{padding: 0 20px 20px;}
    .login-main form .verify-box input {display: inline-block; width: 60%; }
    .login-main form .verify-box img {display: inline-block; margin-left: 2%; width: 36%; height: 38px; }
    .login-main .layui-form-checkbox[lay-skin=primary] i {border-color: #1e9fff!important; color: #fff !important;background: #fff}
    .login-main .layui-form-checked[lay-skin=primary] i {border-color: #1e9fff!important;background-color: #1e9fff;color: #fff;}
    .login-main .layui-form-checkbox[lay-skin=primary]:hover i {border-color: #1e9fff; color: #fff; }
    @media screen and (max-width: 450px) {
        body{height: 100vh;}
        .login-main {width: 300px; margin: -150px 0 0 -150px; }
        .login-main .layui-elip {height: 90px; line-height: 90px; }
        .login-main .layui-elip {font-size: 20px; }
    }
    </style>
    {:hook('admin_login_style')}
</head>

<body>
    <div id="mydiv">
        <div class="login-main">
            <div class="layui-elip">YZNCMS管理系统&nbsp;<span class="version">v{$Think.config.version.yzncms_version}</span><span class="bg1"></span><span class="bg2"></span></div>
            <form class="layui-form" action="{:url('login')}">
                <!--@AdminLoginFormBegin-->
                {:token()}
                <div class="login-container">
                    <div class="layui-form-item">
                        <div class="layui-input-wrap">
                            <div class="layui-input-prefix">
                                <i class="layui-icon layui-icon-username"></i>
                            </div>
                            <input type="text" name="username" lay-verify="required" autocomplete="off" placeholder="账号" class="layui-input" lay-affix="clear">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-wrap">
                            <div class="layui-input-prefix">
                                <i class="layui-icon layui-icon-password"></i>
                            </div>
                            <input type="password" name="password" lay-verify="required" autocomplete="off" placeholder="密码" class="layui-input" lay-affix="eye">
                        </div>
                    </div>
                    <!--@CaptchaBegin-->
                    <div class="layui-form-item">
                        <div class="layui-input-wrap verify-box">
                            <div class="layui-input-prefix">
                                <i class="layui-icon layui-icon-vercode"></i>
                            </div>
                            <input type="text" name="verify" lay-verify="required" placeholder="验证码" autocomplete="off" class="layui-input">
                            <img id="verify" src="{:captcha_src()}" alt="验证码" class="captcha">
                        </div>
                    </div>
                    <!--@CaptchaEnd-->
                    {if $keeyloginhours>0}
                    <div class="layui-form-item" lay-tips="设定会话有效时长为{$keeyloginhours}小时">
                        <input type="checkbox" name="keeplogin" title="保持会话" lay-skin="primary">
                    </div>
                    {/if}
                    <div class="layui-form-item login-btn">
                        <button class="layui-btn layui-btn-normal layui-btn-fluid" lay-submit>登录</button>
                    </div>
                </div>
                <!--@AdminLoginFormEnd-->
            </form>
        </div>
    </div>
    <script type="text/javascript" src="__STATIC__/libs/layui/layui.js"></script>
    <script src="__STATIC__/libs/jquery/jquery.min.js"></script>
    {include file='layui' /}
    <script type="text/javascript">
    layui.use(['form', 'layer', 'yznForm'], function() {
        var form = layui.form,
            layer = layui.layer,
            yznForm = layui.yznForm;

        yznForm.bindevent($(".layui-form"),'', function(data,res) {
            layer.msg('登入成功', {
                offset: '15px',
                icon: 1,
                time: 1000
            }, function() {
                window.location.href = res.url;
            });
            return false;
        }, function(res) {
            $("#verify").click();
        });
    });
    //刷新验证码
    $("#verify").click(function() {
        var verifyimg = $("#verify").attr("src");
        $("#verify").attr("src", verifyimg.replace(/\?.*$/, '') + '?' + Math.random());
    });
    </script>
    {:hook('admin_login_form')}
</body>

</html>